package com.lancoo.cvas.pojo.common;

public enum RoomType {
    ClassRoom(0, "在班级教室上课"),
    AIRoom(1, "AI智慧教室"),
    ComputerRoom(2, "机房"),
    CloudRoom(3, "云网络教室");

    private int code;
    private String msg;

    RoomType(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    public static RoomType getByCode(int code){
        for (RoomType value : RoomType.values()) {
            if (value.getCode() == code){
                return value;
            }
        }
        return null;
    }
}
